<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>

<form class="form-horizontal" role="form" action="{:url('/updateData')}">
    <input type="hidden" name="id" value="{$data.id}">
    <div class="form-group">
        <label for="firstname" class="col-sm-2 control-label">组名</label>
        <div class="col-sm-10">
            <input type="text" class="form-control" id="firstname" name="group_name" value="{$data.group_name}">
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <label>权限</label>
            <div class="checkbox">
                {foreach $powerData as $val}
                <label>
                    <input type="checkbox" value="{$val.id}" name="power_id[]" {if $data.power_id == $val.id} checked {/if}>{$val.power_name}
                </label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">状态</label>
        <div class="col-sm-10">
            <input type="radio" class="form-control" name="state" value="1" {if $data.state == 1} checked {/if}>正常
            <input type="radio" class="form-control" name="state" value="0" {if $data.state == 0} checked {/if}>隐藏
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <button type="submit" class="btn btn-default">提交</button>
        </div>
    </div>
</form>

</body>
</html>